<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/js/vue.js"></script>
    <script src="/js/axios.js"></script>
</head>
<body>
<div id="d">
    <img src="/images/1.jpg" alt="" style="width: 300px; height: 300px;">
    <button @click="test()">测试</button>
    <h1>{{data}}</h1>
</div>
<script>
    new Vue({
        el:"#d",
        data:{
            data:'',
        },
        methods:{
            test(){
                axios.get('/test').then(rs=>{
                    this.data = rs.data;
                });
            }
        }
    });
</script>
</body>
</html>